import java.util.Scanner;

public class Sortition {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        if (sc.nextLine() == "0"){
            return;
        }
        int sortition = RandomInt.randomInt(0,100);
        if (sortition >= 0 && sortition<5)
            System.out.println("大吉");
        else if (sortition >= 5 && sortition<15)
            System.out.println("中吉");
        else if (sortition >= 16 && sortition<30)
            System.out.println("小吉");
        else if (sortition >= 31 && sortition<60)
            System.out.println("吉");
        else if (sortition >= 61 && sortition<80)
            System.out.println("末吉");
        else if (sortition >= 81 && sortition<95)
            System.out.println("凶");
        else if (sortition >= 95 && sortition<100)
            System.out.println("大凶");
    }
}
